< previous page page_488 next page >

Page 488
Day 5
9f8044bafea36a1f728739c0bb58ef4c.gif
1. What are helper methods?
9f8044bafea36a1f728739c0bb58ef4c.gif
Helper methods offload some of a public method's responsibilities.
9f8044bafea36a1f728739c0bb58ef4c.gif
2. What is the best way to manage your runtime object creatures?
9f8044bafea36a1f728739c0bb58ef4c.gif
To implement tactics to reduce the amount of memory space your application needs.
9f8044bafea36a1f728739c0bb58ef4c.gif
3. What's wrong with variants as return types?
9f8044bafea36a1f728739c0bb58ef4c.gif
Variants require more memory than other types because of the underlying mapping to specific types.
9f8044bafea36a1f728739c0bb58ef4c.gif
4. What's a good way to help manage memory use?
9f8044bafea36a1f728739c0bb58ef4c.gif
To track and eliminate unused methods and attributes and to avoid variants.
9f8044bafea36a1f728739c0bb58ef4c.gif
5. What are the best ways to achieve reuse?
9f8044bafea36a1f728739c0bb58ef4c.gif
The best ways to achieve reuse are by having well-defined class interfaces in which each interface has only a few, well-encapsulated public methods; by elaborating abstractions from unambiguous terms and concepts in the domain; with uncomplicated class inheritance relationships or delegation; with well-documented use cases that themselves can be reused; and commitment from fellow team members to practice good object-oriented programming.
9f8044bafea36a1f728739c0bb58ef4c.gif
6. What is an implementation class?
9f8044bafea36a1f728739c0bb58ef4c.gif
Any class that implements its own interface or the interface of another class is an implementation class.
9f8044bafea36a1f728739c0bb58ef4c.gif
7. What should you do when you discover design flaws in construction?
9f8044bafea36a1f728739c0bb58ef4c.gif
Revisit those diagrams and pinpoint applicationwide ramifications of those flaws.
9f8044bafea36a1f728739c0bb58ef4c.gif
8. What is aggregation?
9f8044bafea36a1f728739c0bb58ef4c.gif
Aggregation represents a tightly or loosely coupled ownership relationship between an aggregate object and the objects it's aggregating. By ownership, it is meant that the aggregate object owns either the lifetime of an object (composition) or the exclusive use of services (containment) of an object. Aggregation is best defined by the distinction between composition and containment.
9f8044bafea36a1f728739c0bb58ef4c.gif
9. What responsibility does a composite object have?
9f8044bafea36a1f728739c0bb58ef4c.gif
A composite object is responsible for creating and destroying the object of which it is composed. In some cases, the composite object specifies that another object be delegated such responsibility, as in the case of object factories and garbage collectors.

 
< previous page page_488 next page >

If you like this book, buy it!